package com.whli.autumn.mall.wms.service;

import com.whli.autumn.core.extend.service.IBaseService;
import com.whli.autumn.mall.wms.domain.dto.stock.StockQueryDTO;
import com.whli.autumn.mall.wms.domain.entity.Stock;
import com.whli.autumn.mall.wms.domain.vo.stock.StockVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>库存信息业务</p>
 *
 * @author whli
 * @version 1.0.0
 * @since 2023-04-09 08:37
 */
public interface IStockService extends IBaseService<Stock> {

    /**
     * <p>查询指定仓库数据</p>
     *
     * @author whli
     * @since 2023/5/1 11:51
     * @param entity 入参
     * @return
     */
    List<StockVO> findByWarehouse(StockQueryDTO entity);

    /**
     * <p>更新库存</p>
     *
     * @author whli
     * @since 2023/5/1 12:03
     * @param id       占用
     * @param stockQty 库存
     * @return
     */
    boolean changeStockQty(String id, BigDecimal stockQty);

    /**
     * <p>更新占用库存</p>
     *
     * @author whli
     * @since 2023/5/1 12:03
     * @param id          主键
     * @param occupiedQty 占用库存
     * @return
     */
    boolean changeOccupiedQty(String id, BigDecimal occupiedQty);

}
